<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Mall/Mall_regular_bus.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Mall_regular_bus.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'Id',
        footer: 'Foots',
        cnName: '班车路线表',
        name: 'Mall_regular_bus',
        url: '/Mall_regular_bus/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: { name: '', coverSettings: [], isShow: '', sort: '', introduce: '', type: '' },
      editFormOptions: [
        [
          { title: '路线', required: true, field: 'name', type: 'text', colSize: 4 },
          { title: '分类', required: true, field: 'type', type: 'select', dataKey: 'regularbusType', colSize: 4 },
          { title: '排序号', field: 'sort', type: 'text', colSize: 4 },
        ],
        [
          { title: '封面设置', required: false, field: 'coverSettings', type: 'imgupgrade', colSize: 4, maxSize: 1, maxFile: 1, multiple: true },
          { title: '可预约人数', type: 'switch', field: 'isShow', colSize: 4 },
        ],
        [{ title: '详细介绍', required: true, field: 'introduce', type: 'textarea', colSize: 12 }],
      ],
      searchFormFields: { name: '' },
      searchFormOptions: [[{ title: '路线', field: 'name', type: 'like' }]],
      columns: [
        { field: 'name', title: '路线', type: 'string', width: 220, align: 'left' },
        { field: 'coverSettings', title: '封面设置', type: 'imgupgrade', width: 220, align: 'left', sortable: true },
        { field: 'introduce', title: '详细介绍', type: 'string', width: 220, align: 'left' },
        //  {field:'Id',title:'主键',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
        { field: 'isShow', title: '是否显示可预约人数', type: 'int', bind: { key: 'enable', data: [] }, width: 120, align: 'left' },
        { field: 'type', title: '分类', type: 'int', bind: { key: 'regularbusType', data: [] }, width: 90, align: 'left' },
        { field: 'sort', title: '排序号', type: 'string', width: 60, align: 'left' },
        { field: 'creator', title: '创建人', type: 'string', width: 120, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 120, align: 'left', sortable: true },
        //  {field:'createID',title:'创建人ID',type:'int',width:120,hidden:true,align:'left'},
        { field: 'modifier', title: '修改人', type: 'string', width: 120, align: 'left' },
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 120, align: 'left', sortable: true },
        //  {field:'modifyID',title:'修改人ID',type:'int',width:120,hidden:true,align:'left'}
      ],
      detail: {
        cnName: '班车路线时间表',
        columns: [
          { field: 'startTime', title: '发车时间点', type: 'time', width: 90, align: 'left', sortable: true, edit: { type: 'time', keep: true } },
          // {field:'createDate',title:'创建时间',type:'datetime',width:90,align:'left',sortable:true},
          //  {field:'createID',title:'创建人ID',type:'int',width:90,hidden:true,align:'left'},
          //  {field:'creator',title:'创建人',type:'string',width:180,align:'left'},
          { field: 'number', title: '人数', type: 'int', width: 90, align: 'left', edit: { type: '' }, sortable: true },
          //  {field:'Id',title:'主键',type:'string',width:90,hidden:true,readonly:true,require:true,align:'left'},
          { field: 'isUse', title: '是否启用', type: 'int', width: 90, align: 'left', edit: { type: 'switch' }, sortable: true },
          //  {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
          //  {field:'modifyDate',title:'修改时间',type:'datetime',width:90,align:'left',sortable:true},
          //  {field:'modifyID',title:'修改人ID',type:'int',width:90,hidden:true,align:'left'},
          //  {field:'regular_bus_id',title:'主表ID',type:'int',width:90,align:'left'},
        ],
        sortName: 'createDate',
        key: 'Id',
      },
    }
  },
}
export default vueParam
</script>
